#include <stdio.h>
#include <signal.h>


int main(void)
{
   int pid, ppid, status;

   int PID1, PID2, PID3;

   if((PID1 = fork()) == 0) execl("son1.out","son", NULL);
   if((PID2 = fork()) == 0) execl("son2.out","son", NULL);
   if((PID3 = fork()) == 0) execl("son3.out","son", NULL);

   pid=getpid();
   ppid=getppid();
   printf("FATHER PARAM: pid=%i  ppid=%i\n", pid,ppid);

   sleep(2);

   printf("sending SIGINT to son1");
   kill(PID1, SIGINT);
   printf("sending SIGINT to son2");
   kill(PID2, SIGINT);
   printf("sending SIGINT to son3");
   kill(PID3, SIGINT);

   printf("all signals sent\n");
   sleep(2);
   wait(&status);

   return 0;
}   
